package de.distMLP.evaluation;

import java.util.Comparator;
import java.util.HashMap;

public class DoubleValueComparator implements Comparator<Integer> {

	private final HashMap<Integer, Double> map;

	public DoubleValueComparator(final HashMap<Integer, Double> map) {
		this.map = map;
	}

	@Override
	public int compare(final Integer a, final Integer b) {
		if (this.map.get(a) >= this.map.get(b)) {
			return -1;
		} else {
			return 1;
		}
	}

}
